<!DOCTYPE html>
<html>
<head>
     <title></title>
</head>
<body>
    
</body>

    <script>
      document.write('COOKIE:'+document.cookie+'<br>');


      document.cookie = 'sex=0';
      document.write('COOKIE:'+document.cookie+'<br>');

      var d = new Date();
      d.setTime(d.getTime()+3600*1000); // 到期时间
      document.cookie = 'username=yanyan;path=/;expires='d.toUTCString();
      document.write('COOKIE:'+document.cookie+'<br>');

       
    </script>
</html>